<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>shark::LDA Class Reference</title>
<script type="text/javaScript" src="search/search.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js"></script>
<script src="../../mlstyle.js"></script>
<link href="../css/besser.css" rel="stylesheet" type="text/css"/>
</head>
<!-- pretty cool: each body gets an id tag which is the basename of the web page  -->
<!--              and allows for page-specific CSS. this is client-side scripted, -->
<!--              so the id will not yet show up in the served source code -->
<script type="text/javascript">
    jQuery(document).ready(function () {
        var url = jQuery(location).attr('href');
        var pname = url.substr(url.lastIndexOf("/")+1, url.lastIndexOf(".")-url.lastIndexOf("/")-1);
        jQuery('#this_url').html('<strong>' + pname + '</strong>');
        jQuery('body').attr('id', pname);
    });
</script>
<body>
    <div id="shark_old">
        <div id="wrap">
            <div id="header">
                <div id="site-name"><a href="../../sphinx_pages/build/html/index.html">Shark machine learning library</a></div>
                <ul id="nav">
                    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/installation.html">Installation</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/tutorials/tutorials.html">Tutorials</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/benchmark.html">Benchmarks</a>
                    </li>
                    <li class="active">
                        <a href="classes.html">Documentation</a>
                        <ul>
                            <li class="first"></li>
                            <li><a href="../../sphinx_pages/build/html/rest_sources/quickref/quickref.html">Quick references</a></li>
                            <li><a href="classes.html">Class list</a></li>
                            <li class="last"><a href="group__shark__globals.html">Global functions</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
<div id="doxywrapper">
<!--
    <div id="global_doxytitle">Doxygen<br>Documentation:</div>
-->
    <div id="navrow_wrapper">
<!-- Generated by Doxygen 1.9.8 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceshark.html">shark</a></li><li class="navelem"><a class="el" href="classshark_1_1_l_d_a.html">LDA</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="classshark_1_1_l_d_a-members.html">List of all members</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle"><div class="title">shark::LDA Class Reference<div class="ingroups"><a class="el" href="group__supervised__trainer.html">Supervised Trainers</a></div></div></div>
</div><!--header-->
<div class="contents">

<p>Linear Discriminant Analysis (<a class="el" href="classshark_1_1_l_d_a.html" title="Linear Discriminant Analysis (LDA)">LDA</a>)  
 <a href="classshark_1_1_l_d_a.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_l_d_a_8h_source.html">shark/Algorithms/Trainers/LDA.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for shark::LDA:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="classshark_1_1_l_d_a__inherit__graph.png" border="0" usemap="#ashark_1_1_l_d_a_inherit__map" alt="Inheritance graph"/></div>
<map name="ashark_1_1_l_d_a_inherit__map" id="ashark_1_1_l_d_a_inherit__map">
<area shape="rect" title="Linear Discriminant Analysis (LDA)" alt="" coords="283,46,370,72"/>
<area shape="rect" href="classshark_1_1_abstract_weighted_trainer.html" title=" " alt="" coords="5,5,235,46"/>
<area shape="poly" title=" " alt="" coords="250,44,283,49,282,55,249,49"/>
<area shape="rect" href="classshark_1_1_i_parameterizable.html" title="Top level interface for everything that holds parameters." alt="" coords="40,71,200,111"/>
<area shape="poly" title=" " alt="" coords="215,74,282,63,283,68,215,79"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ae9ed3a8047ccb47a568eb7b6ec638efb" id="r_ae9ed3a8047ccb47a568eb7b6ec638efb"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_l_d_a.html#ae9ed3a8047ccb47a568eb7b6ec638efb">LDA</a> (double <a class="el" href="classshark_1_1_l_d_a.html#a57673aefbc9282a1772ee99121a09632">regularization</a>=0.0)</td></tr>
<tr class="memdesc:ae9ed3a8047ccb47a568eb7b6ec638efb"><td class="mdescLeft">&#160;</td><td class="mdescRight">constructor  <br /></td></tr>
<tr class="separator:ae9ed3a8047ccb47a568eb7b6ec638efb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a393bdae1c49922552128c7fe310cd950" id="r_a393bdae1c49922552128c7fe310cd950"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_l_d_a.html#a393bdae1c49922552128c7fe310cd950">name</a> () const</td></tr>
<tr class="memdesc:a393bdae1c49922552128c7fe310cd950"><td class="mdescLeft">&#160;</td><td class="mdescRight">From <a class="el" href="classshark_1_1_i_nameable.html" title="This class is an interface for all objects which can have a name.">INameable</a>: return the class name.  <br /></td></tr>
<tr class="separator:a393bdae1c49922552128c7fe310cd950"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a57673aefbc9282a1772ee99121a09632" id="r_a57673aefbc9282a1772ee99121a09632"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_l_d_a.html#a57673aefbc9282a1772ee99121a09632">regularization</a> () const</td></tr>
<tr class="memdesc:a57673aefbc9282a1772ee99121a09632"><td class="mdescLeft">&#160;</td><td class="mdescRight">return the regularization constant  <br /></td></tr>
<tr class="separator:a57673aefbc9282a1772ee99121a09632"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e5c08ed10cf6e2a95a853925a8ca41c" id="r_a6e5c08ed10cf6e2a95a853925a8ca41c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_l_d_a.html#a6e5c08ed10cf6e2a95a853925a8ca41c">setRegularization</a> (double <a class="el" href="classshark_1_1_l_d_a.html#a57673aefbc9282a1772ee99121a09632">regularization</a>)</td></tr>
<tr class="memdesc:a6e5c08ed10cf6e2a95a853925a8ca41c"><td class="mdescLeft">&#160;</td><td class="mdescRight">set the regularization constant. 0 means no regularization.  <br /></td></tr>
<tr class="separator:a6e5c08ed10cf6e2a95a853925a8ca41c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a44509c51933cc29a3c069df195cb0a77" id="r_a44509c51933cc29a3c069df195cb0a77"><td class="memItemLeft" align="right" valign="top">RealVector&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_l_d_a.html#a44509c51933cc29a3c069df195cb0a77">parameterVector</a> () const</td></tr>
<tr class="memdesc:a44509c51933cc29a3c069df195cb0a77"><td class="mdescLeft">&#160;</td><td class="mdescRight">inherited from <a class="el" href="classshark_1_1_i_parameterizable.html" title="Top level interface for everything that holds parameters.">IParameterizable</a>; read the regularization parameter  <br /></td></tr>
<tr class="separator:a44509c51933cc29a3c069df195cb0a77"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b65961cbc1b0a1188c74ec4fc82f60b" id="r_a5b65961cbc1b0a1188c74ec4fc82f60b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_l_d_a.html#a5b65961cbc1b0a1188c74ec4fc82f60b">setParameterVector</a> (RealVector const &amp;param)</td></tr>
<tr class="memdesc:a5b65961cbc1b0a1188c74ec4fc82f60b"><td class="mdescLeft">&#160;</td><td class="mdescRight">inherited from <a class="el" href="classshark_1_1_i_parameterizable.html" title="Top level interface for everything that holds parameters.">IParameterizable</a>; set the regularization parameter  <br /></td></tr>
<tr class="separator:a5b65961cbc1b0a1188c74ec4fc82f60b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a625e0968e015305316c577289c2764" id="r_a7a625e0968e015305316c577289c2764"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_l_d_a.html#a7a625e0968e015305316c577289c2764">numberOfParameters</a> () const</td></tr>
<tr class="memdesc:a7a625e0968e015305316c577289c2764"><td class="mdescLeft">&#160;</td><td class="mdescRight">inherited from <a class="el" href="classshark_1_1_i_parameterizable.html" title="Top level interface for everything that holds parameters.">IParameterizable</a>  <br /></td></tr>
<tr class="separator:a7a625e0968e015305316c577289c2764"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a53609e2f3691ec883cdff5332f213f0a" id="r_a53609e2f3691ec883cdff5332f213f0a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_l_d_a.html#a53609e2f3691ec883cdff5332f213f0a">train</a> (<a class="el" href="classshark_1_1_linear_classifier.html">LinearClassifier</a>&lt;&gt; &amp;model, <a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt; RealVector, unsigned int &gt; const &amp;dataset)</td></tr>
<tr class="memdesc:a53609e2f3691ec883cdff5332f213f0a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the <a class="el" href="classshark_1_1_l_d_a.html" title="Linear Discriminant Analysis (LDA)">LDA</a> solution for a multi-class problem.  <br /></td></tr>
<tr class="separator:a53609e2f3691ec883cdff5332f213f0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a85af42411047e3b5a5327246faafd604" id="r_a85af42411047e3b5a5327246faafd604"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_l_d_a.html#a85af42411047e3b5a5327246faafd604">train</a> (<a class="el" href="classshark_1_1_linear_classifier.html">LinearClassifier</a>&lt;&gt; &amp;model, <a class="el" href="classshark_1_1_weighted_labeled_data.html">WeightedLabeledData</a>&lt; RealVector, unsigned int &gt; const &amp;dataset)</td></tr>
<tr class="memdesc:a85af42411047e3b5a5327246faafd604"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the <a class="el" href="classshark_1_1_l_d_a.html" title="Linear Discriminant Analysis (LDA)">LDA</a> solution for a weighted multi-class problem.  <br /></td></tr>
<tr class="separator:a85af42411047e3b5a5327246faafd604"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classshark_1_1_abstract_weighted_trainer"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshark_1_1_abstract_weighted_trainer')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classshark_1_1_abstract_weighted_trainer.html">shark::AbstractWeightedTrainer&lt; LinearClassifier&lt;&gt;, unsigned int &gt;</a></td></tr>
<tr class="memitem:ad35ae0b236c45b73f749285a54288e89 inherit pub_methods_classshark_1_1_abstract_weighted_trainer" id="r_ad35ae0b236c45b73f749285a54288e89"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_weighted_trainer.html#ad35ae0b236c45b73f749285a54288e89">train</a> (<a class="el" href="classshark_1_1_abstract_weighted_trainer.html#ad2ad0a52ecd9ac8677df6dbf403b68b4">ModelType</a> &amp;model, <a class="el" href="classshark_1_1_abstract_weighted_trainer.html#ab6d74ebe9e01f9eefb70f9eb12738ffe">WeightedDatasetType</a> const &amp;dataset)=0</td></tr>
<tr class="memdesc:ad35ae0b236c45b73f749285a54288e89 inherit pub_methods_classshark_1_1_abstract_weighted_trainer"><td class="mdescLeft">&#160;</td><td class="mdescRight">Executes the algorithm and trains a model on the given weighted data.  <br /></td></tr>
<tr class="separator:ad35ae0b236c45b73f749285a54288e89 inherit pub_methods_classshark_1_1_abstract_weighted_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e5711480e4f1e214ff3c30a9604d10a inherit pub_methods_classshark_1_1_abstract_weighted_trainer" id="r_a9e5711480e4f1e214ff3c30a9604d10a"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_weighted_trainer.html#a9e5711480e4f1e214ff3c30a9604d10a">train</a> (<a class="el" href="classshark_1_1_abstract_weighted_trainer.html#ad2ad0a52ecd9ac8677df6dbf403b68b4">ModelType</a> &amp;model, <a class="el" href="classshark_1_1_abstract_weighted_trainer.html#a8c8370c0d2c2550a50df4d6b0bccf42b">DatasetType</a> const &amp;dataset)</td></tr>
<tr class="memdesc:a9e5711480e4f1e214ff3c30a9604d10a inherit pub_methods_classshark_1_1_abstract_weighted_trainer"><td class="mdescLeft">&#160;</td><td class="mdescRight">Executes the algorithm and trains a model on the given unweighted data.  <br /></td></tr>
<tr class="separator:a9e5711480e4f1e214ff3c30a9604d10a inherit pub_methods_classshark_1_1_abstract_weighted_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classshark_1_1_abstract_trainer"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshark_1_1_abstract_trainer')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classshark_1_1_abstract_trainer.html">shark::AbstractTrainer&lt; Model, LabelTypeT &gt;</a></td></tr>
<tr class="memitem:a71d3fd2567473d746ecb733d7fa28c7e inherit pub_methods_classshark_1_1_abstract_trainer" id="r_a71d3fd2567473d746ecb733d7fa28c7e"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_trainer.html#a71d3fd2567473d746ecb733d7fa28c7e">train</a> (<a class="el" href="classshark_1_1_abstract_trainer.html#a0d5c9d35b614d6a33e4e8bfeaf1e9298">ModelType</a> &amp;model, <a class="el" href="classshark_1_1_abstract_trainer.html#aa4730fe9d59622d35d95cd4233f8d7af">DatasetType</a> const &amp;dataset)=0</td></tr>
<tr class="memdesc:a71d3fd2567473d746ecb733d7fa28c7e inherit pub_methods_classshark_1_1_abstract_trainer"><td class="mdescLeft">&#160;</td><td class="mdescRight">Core of the Trainer interface.  <br /></td></tr>
<tr class="separator:a71d3fd2567473d746ecb733d7fa28c7e inherit pub_methods_classshark_1_1_abstract_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classshark_1_1_i_nameable"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshark_1_1_i_nameable')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classshark_1_1_i_nameable.html">shark::INameable</a></td></tr>
<tr class="memitem:a877dbdfc6b58ea836495143cea44a98c inherit pub_methods_classshark_1_1_i_nameable" id="r_a877dbdfc6b58ea836495143cea44a98c"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_nameable.html#a877dbdfc6b58ea836495143cea44a98c">~INameable</a> ()</td></tr>
<tr class="separator:a877dbdfc6b58ea836495143cea44a98c inherit pub_methods_classshark_1_1_i_nameable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classshark_1_1_i_serializable"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshark_1_1_i_serializable')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classshark_1_1_i_serializable.html">shark::ISerializable</a></td></tr>
<tr class="memitem:a7baa9ce108d7278822297ce15882782a inherit pub_methods_classshark_1_1_i_serializable" id="r_a7baa9ce108d7278822297ce15882782a"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#a7baa9ce108d7278822297ce15882782a">~ISerializable</a> ()</td></tr>
<tr class="memdesc:a7baa9ce108d7278822297ce15882782a inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual d'tor.  <br /></td></tr>
<tr class="separator:a7baa9ce108d7278822297ce15882782a inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4ad9a7c274deff642f91e98417fbc63 inherit pub_methods_classshark_1_1_i_serializable" id="r_ad4ad9a7c274deff642f91e98417fbc63"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#ad4ad9a7c274deff642f91e98417fbc63">read</a> (<a class="el" href="namespaceshark.html#ada68729491840669e47c8ad42282424f">InArchive</a> &amp;archive)</td></tr>
<tr class="memdesc:ad4ad9a7c274deff642f91e98417fbc63 inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read the component from the supplied archive.  <br /></td></tr>
<tr class="separator:ad4ad9a7c274deff642f91e98417fbc63 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9bddedd42933c922e323b73131f62f12 inherit pub_methods_classshark_1_1_i_serializable" id="r_a9bddedd42933c922e323b73131f62f12"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#a9bddedd42933c922e323b73131f62f12">write</a> (<a class="el" href="namespaceshark.html#af4f8eb8e9618f5236b71bbcb12b8a524">OutArchive</a> &amp;archive) const</td></tr>
<tr class="memdesc:a9bddedd42933c922e323b73131f62f12 inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write the component to the supplied archive.  <br /></td></tr>
<tr class="separator:a9bddedd42933c922e323b73131f62f12 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abdda0c5b8e065b8afbac2cba8f58e841 inherit pub_methods_classshark_1_1_i_serializable" id="r_abdda0c5b8e065b8afbac2cba8f58e841"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#abdda0c5b8e065b8afbac2cba8f58e841">load</a> (<a class="el" href="namespaceshark.html#ada68729491840669e47c8ad42282424f">InArchive</a> &amp;archive, unsigned int version)</td></tr>
<tr class="memdesc:abdda0c5b8e065b8afbac2cba8f58e841 inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Versioned loading of components, calls read(...).  <br /></td></tr>
<tr class="separator:abdda0c5b8e065b8afbac2cba8f58e841 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5bf66fa8db15cc529bec98976a2f5255 inherit pub_methods_classshark_1_1_i_serializable" id="r_a5bf66fa8db15cc529bec98976a2f5255"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#a5bf66fa8db15cc529bec98976a2f5255">save</a> (<a class="el" href="namespaceshark.html#af4f8eb8e9618f5236b71bbcb12b8a524">OutArchive</a> &amp;archive, unsigned int version) const</td></tr>
<tr class="memdesc:a5bf66fa8db15cc529bec98976a2f5255 inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Versioned storing of components, calls write(...).  <br /></td></tr>
<tr class="separator:a5bf66fa8db15cc529bec98976a2f5255 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4560a94e8f4908fe8627e41e7d965735 inherit pub_methods_classshark_1_1_i_serializable" id="r_a4560a94e8f4908fe8627e41e7d965735"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#a4560a94e8f4908fe8627e41e7d965735">BOOST_SERIALIZATION_SPLIT_MEMBER</a> ()</td></tr>
<tr class="separator:a4560a94e8f4908fe8627e41e7d965735 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classshark_1_1_i_parameterizable"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshark_1_1_i_parameterizable')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classshark_1_1_i_parameterizable.html">shark::IParameterizable&lt; VectorType &gt;</a></td></tr>
<tr class="memitem:a9e3a11172e74d1aa7292f3de4e2b6ebc inherit pub_methods_classshark_1_1_i_parameterizable" id="r_a9e3a11172e74d1aa7292f3de4e2b6ebc"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_parameterizable.html#a9e3a11172e74d1aa7292f3de4e2b6ebc">~IParameterizable</a> ()</td></tr>
<tr class="separator:a9e3a11172e74d1aa7292f3de4e2b6ebc inherit pub_methods_classshark_1_1_i_parameterizable"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-attribs" name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:ac97767c25480eaa828de0f18e091f398" id="r_ac97767c25480eaa828de0f18e091f398"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_l_d_a.html#ac97767c25480eaa828de0f18e091f398">m_regularization</a></td></tr>
<tr class="separator:ac97767c25480eaa828de0f18e091f398"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="inherited" name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_types_classshark_1_1_abstract_weighted_trainer"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classshark_1_1_abstract_weighted_trainer')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="classshark_1_1_abstract_weighted_trainer.html">shark::AbstractWeightedTrainer&lt; LinearClassifier&lt;&gt;, unsigned int &gt;</a></td></tr>
<tr class="memitem:ad2ad0a52ecd9ac8677df6dbf403b68b4 inherit pub_types_classshark_1_1_abstract_weighted_trainer" id="r_ad2ad0a52ecd9ac8677df6dbf403b68b4"><td class="memItemLeft" align="right" valign="top">typedef base_type::ModelType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_weighted_trainer.html#ad2ad0a52ecd9ac8677df6dbf403b68b4">ModelType</a></td></tr>
<tr class="separator:ad2ad0a52ecd9ac8677df6dbf403b68b4 inherit pub_types_classshark_1_1_abstract_weighted_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11e51b154b87ed5e33b6ce2c830cd3d6 inherit pub_types_classshark_1_1_abstract_weighted_trainer" id="r_a11e51b154b87ed5e33b6ce2c830cd3d6"><td class="memItemLeft" align="right" valign="top">typedef base_type::InputType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_weighted_trainer.html#a11e51b154b87ed5e33b6ce2c830cd3d6">InputType</a></td></tr>
<tr class="separator:a11e51b154b87ed5e33b6ce2c830cd3d6 inherit pub_types_classshark_1_1_abstract_weighted_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8cc4b95c06687c88b75ea8db8187336d inherit pub_types_classshark_1_1_abstract_weighted_trainer" id="r_a8cc4b95c06687c88b75ea8db8187336d"><td class="memItemLeft" align="right" valign="top">typedef base_type::LabelType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_weighted_trainer.html#a8cc4b95c06687c88b75ea8db8187336d">LabelType</a></td></tr>
<tr class="separator:a8cc4b95c06687c88b75ea8db8187336d inherit pub_types_classshark_1_1_abstract_weighted_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c8370c0d2c2550a50df4d6b0bccf42b inherit pub_types_classshark_1_1_abstract_weighted_trainer" id="r_a8c8370c0d2c2550a50df4d6b0bccf42b"><td class="memItemLeft" align="right" valign="top">typedef base_type::DatasetType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_weighted_trainer.html#a8c8370c0d2c2550a50df4d6b0bccf42b">DatasetType</a></td></tr>
<tr class="separator:a8c8370c0d2c2550a50df4d6b0bccf42b inherit pub_types_classshark_1_1_abstract_weighted_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab6d74ebe9e01f9eefb70f9eb12738ffe inherit pub_types_classshark_1_1_abstract_weighted_trainer" id="r_ab6d74ebe9e01f9eefb70f9eb12738ffe"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_weighted_labeled_data.html">WeightedLabeledData</a>&lt; <a class="el" href="classshark_1_1_abstract_weighted_trainer.html#a11e51b154b87ed5e33b6ce2c830cd3d6">InputType</a>, <a class="el" href="classshark_1_1_abstract_weighted_trainer.html#a8cc4b95c06687c88b75ea8db8187336d">LabelType</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_weighted_trainer.html#ab6d74ebe9e01f9eefb70f9eb12738ffe">WeightedDatasetType</a></td></tr>
<tr class="separator:ab6d74ebe9e01f9eefb70f9eb12738ffe inherit pub_types_classshark_1_1_abstract_weighted_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_types_classshark_1_1_abstract_trainer"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classshark_1_1_abstract_trainer')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="classshark_1_1_abstract_trainer.html">shark::AbstractTrainer&lt; Model, LabelTypeT &gt;</a></td></tr>
<tr class="memitem:a0d5c9d35b614d6a33e4e8bfeaf1e9298 inherit pub_types_classshark_1_1_abstract_trainer" id="r_a0d5c9d35b614d6a33e4e8bfeaf1e9298"><td class="memItemLeft" align="right" valign="top">typedef Model&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_trainer.html#a0d5c9d35b614d6a33e4e8bfeaf1e9298">ModelType</a></td></tr>
<tr class="separator:a0d5c9d35b614d6a33e4e8bfeaf1e9298 inherit pub_types_classshark_1_1_abstract_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0cfa7cdd27b8bb162e64188095f8fa71 inherit pub_types_classshark_1_1_abstract_trainer" id="r_a0cfa7cdd27b8bb162e64188095f8fa71"><td class="memItemLeft" align="right" valign="top">typedef ModelType::InputType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a></td></tr>
<tr class="separator:a0cfa7cdd27b8bb162e64188095f8fa71 inherit pub_types_classshark_1_1_abstract_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4e344106831fb8227c2120681588ea9 inherit pub_types_classshark_1_1_abstract_trainer" id="r_aa4e344106831fb8227c2120681588ea9"><td class="memItemLeft" align="right" valign="top">typedef LabelTypeT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_trainer.html#aa4e344106831fb8227c2120681588ea9">LabelType</a></td></tr>
<tr class="separator:aa4e344106831fb8227c2120681588ea9 inherit pub_types_classshark_1_1_abstract_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4730fe9d59622d35d95cd4233f8d7af inherit pub_types_classshark_1_1_abstract_trainer" id="r_aa4730fe9d59622d35d95cd4233f8d7af"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, <a class="el" href="classshark_1_1_abstract_trainer.html#aa4e344106831fb8227c2120681588ea9">LabelType</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_trainer.html#aa4730fe9d59622d35d95cd4233f8d7af">DatasetType</a></td></tr>
<tr class="separator:aa4730fe9d59622d35d95cd4233f8d7af inherit pub_types_classshark_1_1_abstract_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_types_classshark_1_1_i_parameterizable"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classshark_1_1_i_parameterizable')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="classshark_1_1_i_parameterizable.html">shark::IParameterizable&lt; VectorType &gt;</a></td></tr>
<tr class="memitem:a2ad5e2e60b2b352988b41f46024d790b inherit pub_types_classshark_1_1_i_parameterizable" id="r_a2ad5e2e60b2b352988b41f46024d790b"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="_c_svm_linear_8cpp.html#ab106d665148183a2dc94dcf8716c9203">VectorType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_parameterizable.html#a2ad5e2e60b2b352988b41f46024d790b">ParameterVectorType</a></td></tr>
<tr class="separator:a2ad5e2e60b2b352988b41f46024d790b inherit pub_types_classshark_1_1_i_parameterizable"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Linear Discriminant Analysis (<a class="el" href="classshark_1_1_l_d_a.html" title="Linear Discriminant Analysis (LDA)">LDA</a>) </p>
<p>This classes implements the well known linear discriminant analysis. <a class="el" href="classshark_1_1_l_d_a.html" title="Linear Discriminant Analysis (LDA)">LDA</a> assumes that every point is drawn from a multivariate normal distributions. Every class has its own mean but all classes have the same covariance.</p>
<p>An arbitrary number of classes is supported. The resulting model is of the form </p><p class="formulaDsp">
\[ \arg \max_c \log(p(x|c)*P(c)) \]
</p>
<p> where \( p(x|c) = \exp(-(x-m_c)^T(C+\alpha I)(x-m_c)) \). \( m_c\) are the means of class c, \( C \) is the covariance matrix formed by all data points. The regularization paramter \( \alpha \) is by default 0. The trainer is implemented such, that it still works when C is singular, in this case the singular directions are ignored. </p>

<p class="definition">Definition at line <a class="el" href="_l_d_a_8h_source.html#l00059">59</a> of file <a class="el" href="_l_d_a_8h_source.html">LDA.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ae9ed3a8047ccb47a568eb7b6ec638efb" name="ae9ed3a8047ccb47a568eb7b6ec638efb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae9ed3a8047ccb47a568eb7b6ec638efb">&#9670;&#160;</a></span>LDA()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">shark::LDA::LDA </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>regularization</em> = <code>0.0</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>constructor </p>

<p class="definition">Definition at line <a class="el" href="_l_d_a_8h_source.html#l00063">63</a> of file <a class="el" href="_l_d_a_8h_source.html">LDA.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_l_d_a.html#a57673aefbc9282a1772ee99121a09632">regularization()</a>, and <a class="el" href="classshark_1_1_l_d_a.html#a6e5c08ed10cf6e2a95a853925a8ca41c">setRegularization()</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a393bdae1c49922552128c7fe310cd950" name="a393bdae1c49922552128c7fe310cd950"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a393bdae1c49922552128c7fe310cd950">&#9670;&#160;</a></span>name()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string shark::LDA::name </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>From <a class="el" href="classshark_1_1_i_nameable.html" title="This class is an interface for all objects which can have a name.">INameable</a>: return the class name. </p>

<p>Reimplemented from <a class="el" href="classshark_1_1_i_nameable.html#a9893f99314de30cd472e649c235d0db4">shark::INameable</a>.</p>

<p class="definition">Definition at line <a class="el" href="_l_d_a_8h_source.html#l00068">68</a> of file <a class="el" href="_l_d_a_8h_source.html">LDA.h</a>.</p>

</div>
</div>
<a id="a7a625e0968e015305316c577289c2764" name="a7a625e0968e015305316c577289c2764"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7a625e0968e015305316c577289c2764">&#9670;&#160;</a></span>numberOfParameters()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">size_t shark::LDA::numberOfParameters </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>inherited from <a class="el" href="classshark_1_1_i_parameterizable.html" title="Top level interface for everything that holds parameters.">IParameterizable</a> </p>

<p>Reimplemented from <a class="el" href="classshark_1_1_i_parameterizable.html#aed1e8d1d4dbde387e2f6a25141ed3a20">shark::IParameterizable&lt; VectorType &gt;</a>.</p>

<p class="definition">Definition at line <a class="el" href="_l_d_a_8h_source.html#l00094">94</a> of file <a class="el" href="_l_d_a_8h_source.html">LDA.h</a>.</p>

</div>
</div>
<a id="a44509c51933cc29a3c069df195cb0a77" name="a44509c51933cc29a3c069df195cb0a77"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a44509c51933cc29a3c069df195cb0a77">&#9670;&#160;</a></span>parameterVector()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">RealVector shark::LDA::parameterVector </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>inherited from <a class="el" href="classshark_1_1_i_parameterizable.html" title="Top level interface for everything that holds parameters.">IParameterizable</a>; read the regularization parameter </p>

<p>Reimplemented from <a class="el" href="classshark_1_1_i_parameterizable.html#afaa2ba692ab64a0edbff60d7ee6794db">shark::IParameterizable&lt; VectorType &gt;</a>.</p>

<p class="definition">Definition at line <a class="el" href="_l_d_a_8h_source.html#l00083">83</a> of file <a class="el" href="_l_d_a_8h_source.html">LDA.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_l_d_a.html#ac97767c25480eaa828de0f18e091f398">m_regularization</a>.</p>

</div>
</div>
<a id="a57673aefbc9282a1772ee99121a09632" name="a57673aefbc9282a1772ee99121a09632"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a57673aefbc9282a1772ee99121a09632">&#9670;&#160;</a></span>regularization()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double shark::LDA::regularization </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>return the regularization constant </p>

<p class="definition">Definition at line <a class="el" href="_l_d_a_8h_source.html#l00072">72</a> of file <a class="el" href="_l_d_a_8h_source.html">LDA.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_l_d_a.html#ac97767c25480eaa828de0f18e091f398">m_regularization</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_l_d_a.html#ae9ed3a8047ccb47a568eb7b6ec638efb">LDA()</a>, and <a class="el" href="classshark_1_1_l_d_a.html#a6e5c08ed10cf6e2a95a853925a8ca41c">setRegularization()</a>.</p>

</div>
</div>
<a id="a5b65961cbc1b0a1188c74ec4fc82f60b" name="a5b65961cbc1b0a1188c74ec4fc82f60b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5b65961cbc1b0a1188c74ec4fc82f60b">&#9670;&#160;</a></span>setParameterVector()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void shark::LDA::setParameterVector </td>
          <td>(</td>
          <td class="paramtype">RealVector const &amp;&#160;</td>
          <td class="paramname"><em>param</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>inherited from <a class="el" href="classshark_1_1_i_parameterizable.html" title="Top level interface for everything that holds parameters.">IParameterizable</a>; set the regularization parameter </p>

<p>Reimplemented from <a class="el" href="classshark_1_1_i_parameterizable.html#ad5e35d1a10ff36fa72ea787baa40e9ad">shark::IParameterizable&lt; VectorType &gt;</a>.</p>

<p class="definition">Definition at line <a class="el" href="_l_d_a_8h_source.html#l00089">89</a> of file <a class="el" href="_l_d_a_8h_source.html">LDA.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_l_d_a.html#ac97767c25480eaa828de0f18e091f398">m_regularization</a>, and <a class="el" href="_exception_8h.html#a42a6a50e4d06c00d60fbca5333f40768">SIZE_CHECK</a>.</p>

</div>
</div>
<a id="a6e5c08ed10cf6e2a95a853925a8ca41c" name="a6e5c08ed10cf6e2a95a853925a8ca41c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6e5c08ed10cf6e2a95a853925a8ca41c">&#9670;&#160;</a></span>setRegularization()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void shark::LDA::setRegularization </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>regularization</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>set the regularization constant. 0 means no regularization. </p>

<p class="definition">Definition at line <a class="el" href="_l_d_a_8h_source.html#l00077">77</a> of file <a class="el" href="_l_d_a_8h_source.html">LDA.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_l_d_a.html#ac97767c25480eaa828de0f18e091f398">m_regularization</a>, <a class="el" href="_exception_8h.html#abd848215f138fc44f696aecb3e417e6c">RANGE_CHECK</a>, and <a class="el" href="classshark_1_1_l_d_a.html#a57673aefbc9282a1772ee99121a09632">regularization()</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_l_d_a.html#ae9ed3a8047ccb47a568eb7b6ec638efb">LDA()</a>.</p>

</div>
</div>
<a id="a53609e2f3691ec883cdff5332f213f0a" name="a53609e2f3691ec883cdff5332f213f0a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a53609e2f3691ec883cdff5332f213f0a">&#9670;&#160;</a></span>train() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> void shark::LDA::train </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classshark_1_1_linear_classifier.html">LinearClassifier</a>&lt;&gt; &amp;&#160;</td>
          <td class="paramname"><em>model</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt; RealVector, unsigned int &gt; const &amp;&#160;</td>
          <td class="paramname"><em>dataset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Compute the <a class="el" href="classshark_1_1_l_d_a.html" title="Linear Discriminant Analysis (LDA)">LDA</a> solution for a multi-class problem. </p>

<p class="reference">Referenced by <a class="el" href="_l_d_a_tutorial_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main()</a>.</p>

</div>
</div>
<a id="a85af42411047e3b5a5327246faafd604" name="a85af42411047e3b5a5327246faafd604"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a85af42411047e3b5a5327246faafd604">&#9670;&#160;</a></span>train() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_d_l_l_support_8h.html#a54b73283f7f70b27fbd8ac5d4621827f">SHARK_EXPORT_SYMBOL</a> void shark::LDA::train </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classshark_1_1_linear_classifier.html">LinearClassifier</a>&lt;&gt; &amp;&#160;</td>
          <td class="paramname"><em>model</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classshark_1_1_weighted_labeled_data.html">WeightedLabeledData</a>&lt; RealVector, unsigned int &gt; const &amp;&#160;</td>
          <td class="paramname"><em>dataset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Compute the <a class="el" href="classshark_1_1_l_d_a.html" title="Linear Discriminant Analysis (LDA)">LDA</a> solution for a weighted multi-class problem. </p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="ac97767c25480eaa828de0f18e091f398" name="ac97767c25480eaa828de0f18e091f398"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac97767c25480eaa828de0f18e091f398">&#9670;&#160;</a></span>m_regularization</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double shark::LDA::m_regularization</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The regularization parameter \( \lambda \) adds \( - \lambda I \) to the second moment matrix, where \( I \) is the identity matrix </p>

<p class="definition">Definition at line <a class="el" href="_l_d_a_8h_source.html#l00107">107</a> of file <a class="el" href="_l_d_a_8h_source.html">LDA.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_l_d_a.html#a44509c51933cc29a3c069df195cb0a77">parameterVector()</a>, <a class="el" href="classshark_1_1_l_d_a.html#a57673aefbc9282a1772ee99121a09632">regularization()</a>, <a class="el" href="classshark_1_1_l_d_a.html#a5b65961cbc1b0a1188c74ec4fc82f60b">setParameterVector()</a>, and <a class="el" href="classshark_1_1_l_d_a.html#a6e5c08ed10cf6e2a95a853925a8ca41c">setRegularization()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/shark/Algorithms/Trainers/<a class="el" href="_l_d_a_8h_source.html">LDA.h</a></li>
</ul>
</div><!-- contents -->
</div>
</body>
</html>
